<template>
  <div>
    <van-search
      v-model="title"
      placeholder="请输入搜索关键词"
      wrap-with-form
      show-action
      @click="onSearch"
    />
  </div>
</template>

<script setup>
import { ref } from "vue";
import { useRoute, useRouter } from "vue-router";

const router = useRouter();
const route = useRoute();

const title = ref("");
const onSearch = () => {
  router.push({ path: "/search", query: {} });
};
</script>

<style lang="scss" scoped></style>
